Load spec/env.test on application boot.

Akinori MUSHA %!s(int64=10) %!d(string=hace) años
padre
commit
f0086f0466
Se han modificado 2 ficheros con 2 adiciones y 4 borrados
  1. 2 0
      config/application.rb
  2. 0 4
      spec/spec_helper.rb

+ 2 - 0
config/application.rb

@@ -4,6 +4,8 @@ require 'rails/all'
4 4
 
5 5
 Bundler.require(:default, Rails.env)
6 6
 
7
+Dotenv.overload File.expand_path('../../spec/env.test', __FILE__) if Rails.env.test?
8
+
7 9
 module Huginn
8 10
   class Application < Rails::Application
9 11
     # Settings in config/environments/* take precedence over those specified here.

+ 0 - 4
spec/spec_helper.rb

@@ -8,10 +8,6 @@ else
8 8
   Coveralls.wear!('rails')
9 9
 end
10 10
 
11
-# Required ENV variables that are normally set in .env are setup here for the test environment.
12
-require 'dotenv'
13
-Dotenv.overload File.join(File.dirname(__FILE__), "env.test")
14
-
15 11
 require File.expand_path("../../config/environment", __FILE__)
16 12
 require 'rspec/rails'
17 13
 require 'rspec/autorun'